"""
var r = function(e) {
        var t = n.md5(navigator.appVersion)
          , r = "" + (new Date).getTime()
          , i = r + parseInt(10 * Math.random(), 10);
        return {
            ts: r,
            bv: t,
            salt: i,
            sign: n.md5("fanyideskweb" + e + i + "Ygy_4c=r#e#4EX^NUGUc5")
        }
    };
"""

from hashlib import md5
import time
import random
user_agent = "5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"

def r(e):
    # bv
    t = md5(user_agent.encode()).hexdigest()
    # lts
    r = str(int(time.time() * 1000))
    # salt
    i = r + str(random.randint(0, 9))
    # sign
    s = md5(("fanyideskweb" + e + i + "Ygy_4c=r#e#4EX^NUGUc5").encode()).hexdigest()
    return {'lts': r,
            'bv': t,
            'salt': i,
            'sign': s}

#
# def t():
#     t = md5(user_agent.encode()).hexdigest()
#     return t
# # print(t())
#
#
# def r():
#     return str(int(time.time()*1000))
# # print(r())
#
#
# def i():
#     return r() + str(random.randint(0, 9))
# # print(i())
#
#
# def s(e):
#     return md5(("fanyideskweb" + e + i() + "Ygy_4c=r#e#4EX^NUGUc5").encode()).hexdigest()
# # print(s('你'))
#
